package com.wh.common.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wh.common.pojo.Task;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.joda.time.DateTime;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
* 后端Service接口；
*/
@Mapper
@Repository
public interface TaskMapper extends BaseMapper<Task> {

    /**
     * 分页：查询当前页数据
     * @param page 分页参数
     * @param queryWrapper 查询条件
     * @return
     */
    List<Task> findByPage(@Param("page") IPage<Task> page,@Param("ew") QueryWrapper<Task> queryWrapper);

    void updateData(String title, String content, LocalDateTime time, Integer taskId, String publisher, LocalDateTime deadline);

    List<Long> selectexecutiveIdByTaskId(Integer taskId);

    List<Task> findall();

}
